<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>大小写转换</title>
</head>
<body>
	<script type="text/javascript">
		//将字符的所有内容转换为大写
		var str="welcome to beijing";
		var newStr=str.toUpperCase();
		console.log(newStr);
		//将字符串中的单个字母转换为大写 “t”-->"T"
		var upper=str.charAt(8).toUpperCase();
		console.log(upper);

		//将字符串转换为小写 toLowerCase();
	</script>
</body>
</html>